#ifndef QXGAME_KEYBOARDEVENTS_H
#define QXGAME_KEYBOARDEVENTS_H

#include "SDL.h"

class GameInputEvents {
public:
    virtual void OnInput(SDL_Event &event)
    {
        switch (event.type) {
            case SDL_QUIT:
                Quit();
                break;
            case SDL_KEYDOWN:
                KeyDown(event.key.keysym.sym);
                break;
            case SDL_KEYUP:
                KeyUp(event.key.keysym.sym);
                break;
            case SDL_MOUSEBUTTONDOWN:
                MouseButtonDown(event.button.button);
                break;
            case SDL_MOUSEBUTTONUP:
                MouseButtonUp(event.button.button);
                break;
            default:
                break;
        }
    }

    virtual void Quit()
    {}

    virtual void KeyDown(int32_t &code)
    {}

    virtual void KeyUp(int32_t &code)
    {};

    virtual void MouseButtonDown(uint8_t &button)
    {};

    virtual void MouseButtonUp(uint8_t &button)
    {};
};

#endif // QXGAME_KEYBOARDEVENTS_H
